package space.yangmin.baidu.downloader.util;

import java.io.IOException;

/**
 * @Description TODO
 * @Version 1.0.0
 * @Date 2024/8/7/0007 10:04
 * @Author Administrator
 */
public class BrowserUtil {

    public static void open(String url){
        java.net.URI uri = java.net.URI.create(url);
        java.awt.Desktop dp = java.awt.Desktop.getDesktop();
        if (dp.isSupported(java.awt.Desktop.Action.BROWSE)) {
            try {
                dp.browse(uri);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
    }

}
